function celebrioForAndroid(celebrio) {
    celebrio.applications.kill = function(process) {
        $("#" + celebrio.applications.APPLICATION + process.getId()).remove();
        celebrio.arrays.remove(process, celebrio.applications.processes);

        // TODO this is copied from exit button click - refactor
        $(".dialogApplication").celebrioApp("minimize");
        $(".albireoicon").show();
        $("#taskbar").show();
        $("#scrollbar").show();
        (window).focus();
        //Set focus back to webtop
        $("#task_" + process.name).remove();
        celebrio.desktop.icons.resize();
        return false;
    };

    celebrio.applications.createWindow = function(name, title, content, options) {
        if (options == undefined) {
            options = {};
        }
        
        var info = celebrio.applications.createSingle(name, true);
        process = info.process;
        backgroundUrl =$("#desktopBackground").attr("src");
        iconUrl = options.image;
                
        if (name == "Internet") {
            //Android.fakeStartApplicationLoading(iconUrl, backgroundUrl);
            Android.startBrowser();
        } else {
            if (info.created == true) {
                var app = $("<div id='" + celebrio.applications.APPLICATION + process.getId() + "' class='dialogApplication' title='" + title + "'>" + content + "</div>").appendTo($("#desktopWrapper")).celebrioApp();
                $(app).find('.resizable').width($(app).width()).height($(app).height());
                celebrio.applications.focused = process;
                    
                Android.startApplicationLoading(iconUrl, backgroundUrl);

                var created = info.created;
                $(app).find("iframe").load(function() {
                    if (created) {
                        created = false;
                        Android.stopApplicationLoading();
                    } else {
                        if(!(location.href.indexOf("#") > -1)){
                            Android.fakeStartApplicationLoading(iconUrl, backgroundUrl);
                        } else {
                            Android.stopApplicationLoading();
                        }
                    }
                    history.replaceState({
                        "name" : name,
                        "title" : title,
                        "image" : options.image
                    }, name, "#" + this.contentWindow.location);

                    var exit_button = $(this).contents().find(".exit_application");
                    if (exit_button.length == 0) {
                        console.log("WARNING: The application does not have any EXIT element. Use 'exit_application' class to fix this.")
                    } else {
                        exit_button.click(function() {
                            history.pushState(null, "title", "#");
                            $(".dialogApplication").celebrioApp("minimize");
                            $(".albireoicon").show();
                            $("#taskbar").show();
                            $("#scrollbar").show();
                            (window).focus();
                            celebrio.desktop.icons.resize();
                            //Android.closeBrowser();
                            Android.closeApplication();
                            return false;
                        });
                    }
                });
            } else {
                $("#" + celebrio.applications.APPLICATION + process.getId()).find("iframe").trigger('load');
            }
        }

        return process;
    };

    celebrio.applications.run = function(name, title, url, options) {
        if (name != "Internet") {
            celebrio.desktop.icons.setFocus(url);
            $(".albireoicon").hide();
            $("#taskbar").hide();
            $("#scrollbar").hide();
            process = celebrio.applications.createFromUrl(name, title, url, options);
            history.pushState({
                "name" : name,
                "title" : title,
                "image" : options.image
            }, name, "#" + $("#" + celebrio.applications.APPLICATION + process.getId()).find("iframe").get(0).src);
            if ($("#dummy_layout") != undefined) {
                $("#dummy_layout").show();
            }
        } else {
            process = celebrio.applications.createFromUrl(name, title, url, options);
        }
    }; 

}